﻿using System.Collections.Generic;
using GalaSoft.MvvmLight;

namespace DeploymentTool.Model
{
    public class DepItem : ViewModelBase
    {
        public const string IsSelectedPropertyName = "IsSelected";
        private bool _isSelected = false;
        public bool IsSelected
        {
            get
            {
                return _isSelected;
            }

            set
            {
                if (_isSelected == value)
                {
                    return;
                }

                RaisePropertyChanging(IsSelectedPropertyName);
                _isSelected = value;
                RaisePropertyChanged(IsSelectedPropertyName);
            }
        }

        public const string TextPropertyName = "Value";
        private string _value;
        public string Value
        {
            get
            {
                return _value;
            }

            set
            {
                if (_value == value)
                {
                    return;
                }

                RaisePropertyChanging(TextPropertyName);
                _value = value;
                RaisePropertyChanged(TextPropertyName);
            }
        }
    }

    public class DepItemComparer : IEqualityComparer<DepItem>
    {
        public bool Equals(DepItem x, DepItem y)
        {
            return x.Value == y.Value;
        }

        public int GetHashCode(DepItem obj)
        {
            throw new System.NotImplementedException();
        }
    }
}
/*

Command: Update  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey_PreSalesTech.aspx.designer.cs  
Completed: At revision: 120543  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey.aspx  
Completed: At revision: 120543  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey.aspx.cs  
Completed: At revision: 120543  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey.aspx.designer.cs  
Completed: At revision: 120543  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey_PreSalesTech.aspx  
Completed: At revision: 120543  
Updating: D:\Projects\MSSP\src\MSCU\MSCU\EN\Survey\Survey_PreSalesTech.aspx.cs  
Completed: At revision: 120543  


*/